﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SplitMatch
{
    class myAssist
    {
        // 获得基本的文件名字
        public static string GetSingleFile(string strFile)
        {
            String strBtn = String.Empty;

            string[] strs = strFile.Split('\\');
            strBtn = strs[strs.Length - 1];

            return strBtn;
        }

        public static string GetFullName(List<string> strShowFiles, string strName)
        {
            String strRtn = String.Empty;

            foreach (String eachStr in strShowFiles)
            {
                String strCheck = myAssist.GetSingleFile(eachStr);

                if (0 == String.Compare(strCheck, strName))
                {
                    strRtn = eachStr;
                    break;
                }

            }

            return strRtn;
        }
    }
}
